<?php

return array(
    'view_manager' => array(
        'template_path_stack'      => array(
            __DIR__ . '/../view',
        ),
        'template_map'             => array(
            'base'            => __DIR__ . '/../view/layout/base.phtml',
            'ajax'            => __DIR__ . '/../view/layout/ajax.phtml',
            'fullscreen'      => __DIR__ . '/../view/layout/fullscreen.phtml',
            'error/404'       => __DIR__ . '/../view/error/404.phtml',
            'error/exception' => __DIR__ . '/../view/error/exception.phtml',
        ),
        'display_not_found_reason' => true,
        'display_exceptions'       => true,
        'doctype'                  => 'HTML5',
        'not_found_template'       => 'error/404',
        'exception_template'       => 'error/exception',
        'strategies'               => array('ViewJsonStrategy',),
    ),
    'router'       => array(
        'routes' => array(
            /* home */
            'home'   => array(
                'type'    => 'Zend\Mvc\Router\Http\Literal',
                'options' => array(
                    'route'    => '/',
                    'defaults' => array(
                        'controller' => 'Application\Controller\Index',
                        'action'     => 'index',
                    ),
                ),
            ),
            'Ticket' => array(
                'type'          => 'Literal',
                'options'       => array(
                    'route'    => '/ticket',
                    'defaults' => array(
                        '__NAMESPACE__' => 'Ticket\Controller',
                        'controller'    => 'Home',
                        'action'        => 'index',
                    ),
                ),
                'may_terminate' => true,
                'child_routes'  => array(
                    /* Default */
                    'default' => array(
                        'type'    => 'Segment',
                        'options' => array(
                            'route'       => '/[:controller[/:action[/:id[/:other1[/:other2[/:other3]]]]]]',
                            'constraints' => array(
                                'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'id'         => '[0-9]+',
                                'other1'     => '[0-9]+',
                                'other2'     => '[0-9]+',
                            ),
                            'defaults'    => array(),
                        ),
                    ),
                    'data'    => array(
                        'type'    => 'Segment',
                        'options' => array(
                            'route'       => '/[:controller[/:action[/:data1[/:data2[/:data3]]]]]',
                            'constraints' => array(
                                'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'data1'      => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'data2'      => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'data2'      => '[a-zA-Z][a-zA-Z0-9_-]*',
                            ),
                            'defaults'    => array(),
                        ),
                    ),
                ),
            ),
        ),
    ),
    'controllers'  => array(
        'invokables' => array(
            'Ticket\Controller\Base' => 'Ticket\Controller\BaseController',
            'Ticket\Controller\Home' => 'Ticket\Controller\HomeController',
        ),
    ),
    'module_layouts' => array(
        'Ticket' => 'base',
    ),
);
